{extend name='admin@main'}

{block name="button"}

{if auth("some_confirm")}
<button data-batch='{:url("some_confirm")}?table=user' data-rule="ids#{key}" class='layui-btn layui-btn-sm layui-btn-normal'>批量打款</button>
{/if}

{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='pay_order/user_index_search'}
    <table class="layui-table" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='text-left nowrap'>仓库名称</th>
            <th class='text-left nowrap'>姓名</th>
            <!-- <th class='text-center nowrap'>组长</th> -->
            <th class='text-center nowrap'>类型</th>
            <th class='text-center nowrap'>分类</th>
            <th class='text-center nowrap'>属性</th>
            <th class='text-center nowrap'>结算方式</th>
            <th class='text-left nowrap'>完成件数</th>
            <th class='text-left nowrap'>总金额</th>
            <th class='text-left nowrap'>扣罚金额</th>
            <th class='text-left nowrap'>应发金额</th>
            <th class='text-left nowrap'>已支付金额</th>
            <th class='text-left nowrap'>待支付金额</th>
            <th class='text-left nowrap'>手机</th>
            <th class='text-left nowrap'>银行卡号</th>
            <th class='text-left nowrap'>添加时间</th>
            <th class='text-left nowrap'></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}-{$vo.ware_house_id}-{$vo.wait_pay_price}' type='checkbox'></label>
            </td>
            <td class='text-left nowrap'>{$vo.wh_name|default='-'}</td>
            <td class='text-left nowrap'>{$vo.name|default='-'}</td>
            <!-- <td class='text-center nowrap'>
                {eq name='vo.is_group' value='0'}<span class="layui-badge layui-bg-red">否</span>{/eq}
                {eq name='vo.is_group' value='1'}<span class="layui-badge layui-bg-blue">是</span>{/eq}
            </td> -->
            <td class='text-center nowrap'>
                {eq name='vo.type' value='0'}<span class="layui-badge layui-bg-blue">运力</span>{/eq}
                {eq name='vo.type' value='1'}<span class="layui-badge layui-bg-green">分拣</span>{/eq}
            </td>
            <td class='text-center nowrap'>
                {eq name='vo.classify' value='0'}<span class="layui-badge layui-bg-blue">固定</span>{/eq}
                {eq name='vo.classify' value='1'}<span class="layui-badge layui-bg-green">临时</span>{/eq}
            </td>
            <td class='text-center nowrap'>
                {eq name='vo.att' value='0'}<span class="color-red">车队</span>{/eq}
                {eq name='vo.att' value='1'}<span class="color-green">个人</span>{/eq}
                {eq name='vo.att' value='2'}<span class="color-desc">劳务</span>{/eq}
                {eq name='vo.att' value='3'}<span class="color-blue">自招</span>{/eq}
            </td>
            <td class='text-center nowrap'>
                {eq name='vo.payment_way' value='0'}<span class="color-red">周结</span>{/eq}
                {eq name='vo.payment_way' value='1'}<span class="color-green">月结</span>{/eq}
                {eq name='vo.payment_way' value='2'}<span class="color-desc">无</span>{/eq}
            </td>
            <td class='text-left nowrap'>{$vo.sum|default='-'}</td>
            <td class='text-left nowrap'>{$vo.sum_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.fine_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.reality_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.complete_pay_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.wait_pay_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.phone|default='-'}</td>
            <td class='text-left nowrap'>{$vo.bank_number|default='-'}</td>
            <td class='text-left nowrap'>
                {$vo.create_at|format_datetime}
            </td>
            <td class='text-left nowrap'>

                {if auth("confirm")}
                <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="确认打款" data-modal='{:url("confirm")}?id={$vo.id}&wait_pay_price={$vo.wait_pay_price}&ware_house_id={$vo.ware_house_id}&table=user'>确认打款</a>
                {/if}

                {if auth("pay_log_index")}
                <a class="layui-btn layui-btn-sm" data-open='{:url("pay_log/index")}?id={$vo.id}&table=user&ware_house_id={$vo.ware_house_id}&back=1'>支付记录</a>
                {/if}

                {if auth("order_detail")}
                <a class="layui-btn layui-btn-sm layui-btn-warm" data-open='{:url("order_detail/index")}?ware_house_id={$vo.ware_house_id}&uid={$vo.uid}&back=1'>明细</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>

{/block}
